<template>
  <div>
    <el-card>
      <el-table :data="users" height="550" style="width: 100%">
        <el-table-column prop="username" label="用户名" width="180"></el-table-column>
        <el-table-column prop="password" label="密码" width="180"> </el-table-column>
        <el-table-column prop="roleName" label="角色名"></el-table-column>
      </el-table>
    </el-card>
    
  </div>
</template>

<script>
import { getAllUser } from '@/api/user'
export default {
  data() {
    return {
      users: null
    };
  },
  methods:{
    getAllUser(){
      getAllUser().then(resp=>{
        this.users = resp.data;
      })
    }
  },
  mounted(){
    this.getAllUser();
  }
};
</script>